package com.zhangyx.crawler.core;

import java.io.Serializable;
import java.util.*;

public class Page implements Serializable {
    //请求信息
    private String url;
    private Boolean useGET = true;
    private Map<String, String> header;
    private Map<String, String> requestCookies;
    private Object entity;//map<String,String> or JsonObject

    //返回信息
    private int responseCode;
    private String html;
    private Map<String, String> responseCookies;

    //参数传递
    private Map<String, Object> infoMap = new HashMap<String, Object>();


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Boolean getUseGET() {
        return useGET;
    }

    public void setUseGET(Boolean useGET) {
        this.useGET = useGET;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    public Map<String, String> getRequestCookies() {
        return requestCookies;
    }

    public void setRequestCookies(Map<String, String> requestCookies) {
        this.requestCookies = requestCookies;
    }

    public Object getEntity() {
        return entity;
    }

    public void setEntity(Object entity) {
        this.entity = entity;
    }

    public int getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(int responseCode) {
        this.responseCode = responseCode;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    public Map<String, String> getResponseCookies() {
        return responseCookies;
    }

    public void setResponseCookies(Map<String, String> responseCookies) {
        this.responseCookies = responseCookies;
    }

    public void putInfo(String key, Object value) {
        infoMap.put(key, value);
    }

    public Object getInfo(String key) {
        return infoMap.get(key);
    }

}
